//============================================================================================
/**
 * @file	cmn_res.h
 * @brief	共通リソース
 * @author	Nozomu Saito
 *
 * モジュール名：CmnRes
 */
//============================================================================================

#ifndef __CMN_RES_H__
#define __CMN_RES_H__

#include "system/clact_util.h"

#define COUNT_ID	(20)
#define MARKER_ID	(21)
#define SHADOW_ID	(22)
#define CMN_RES_PAL_ID	(23)
#define CMN_RES_SUB_PAL_ID	(24)
#define F2X2SUB_ID	(25)
#define F4X4_ID	(26)
#define NEW_REC_ID	(27)
#define F2X2_ID	(28)
#define F2X4_ID	(29)
#define F2X2S256_ID	(30)
#define PEN_ID	(31)
#define CUR_ID	(32)

#define CMN_RES_COUNTER_BIT	(1)
#define CMN_RES_SHADOW_BIT	(2)
#define CMN_RES_MARKER_BIT	(4)
#define CMN_RES_F2X2SUB_BIT	(8)
#define CMN_RES_F4X4_BIT	(16)
#define CMN_RES_NEW_REC_BIT	(32)
#define CMN_RES_F2X2_BIT	(64)
#define CMN_RES_F2X4_BIT	(128)
#define CMN_RES_F2X2S256_BIT	(256)
#define CMN_RES_PEN_M_BIT	(512)
#define CMN_RES_PEN_S_BIT	(1024)
#define CMN_RES_CUR_BIT		(2048)

#define CMN_RES_ALL_BIT	( CMN_RES_COUNTER_BIT | CMN_RES_SHADOW_BIT | CMN_RES_MARKER_BIT | CMN_RES_NEW_REC_BIT | CMN_RES_F2X4_BIT )

typedef struct CMN_RES_CNT_tag * CMN_RES_CNT_PTR;

extern CMN_RES_CNT_PTR CmnRes_Init( const int inHeapID, const int inRes,
		const NNS_G2D_VRAM_TYPE inVramType );
extern void CmnRes_Free(CMN_RES_CNT_PTR cnt_ptr);
extern u8 CmnRes_CheckCmnResBit(CMN_RES_CNT_PTR cnt_ptr, const u8 inBit);
extern CLACT_U_RES_MANAGER_PTR	CmnRes_GetResMngPtr(CMN_RES_CNT_PTR cnt_ptr, const int inResType);

//カウントダウンアクター作成
extern CLACT_WORK_PTR CmnRes_CreateCounterAct(	CMN_RES_CNT_PTR pResCntPtr,
												CLACT_SET_PTR pClActSetPtr,
												const int inBGPriority,
												const NNS_G2D_VRAM_TYPE inDrawArea,
												const int inHeapID );
//サブ画面2x2数字アクター作成
extern CLACT_WORK_PTR CmnRes_CreateF2X2SubAct(	CMN_RES_CNT_PTR pResCntPtr,
												CLACT_SET_PTR pClActSetPtr,
												const int inBGPriority,
												const int inHeapID );
//2x2数字アクター作成
extern CLACT_WORK_PTR CmnRes_CreateF2X2Act(	CMN_RES_CNT_PTR pResCntPtr,
											CLACT_SET_PTR pClActSetPtr,
											const int inBGPriority,
											const int inHeapID );
//4x4数字アクター作成
extern CLACT_WORK_PTR CmnRes_CreateF4X4Act(	CMN_RES_CNT_PTR pResCntPtr,
											CLACT_SET_PTR pClActSetPtr,
											const int inBGPriority,
											const int inHeapID );
//ニューレコードアクター作成
extern CLACT_WORK_PTR CmnRes_CreateNewRecAct(	CMN_RES_CNT_PTR pResCntPtr,
												CLACT_SET_PTR pClActSetPtr,
												const int inBGPriority,
												const int inHeapID );
//2x4数字アクター作成
extern CLACT_WORK_PTR CmnRes_CreateF2X4Act(	CMN_RES_CNT_PTR pResCntPtr,
											CLACT_SET_PTR pClActSetPtr,
											const int inBGPriority,
											const int inHeapID );
//サブ画面2x2数字アクター作成(1D256版)
extern CLACT_WORK_PTR CmnRes_CreateF2X2S256Act(	CMN_RES_CNT_PTR pResCntPtr,
												CLACT_SET_PTR pClActSetPtr,
												const int inBGPriority,
												const int inHeapID );
//ペンアクター作成
CLACT_WORK_PTR CmnRes_CreatePenAct(	CMN_RES_CNT_PTR pResCntPtr,
									CLACT_SET_PTR pClActSetPtr,
									const int inVramType,
									const int inBGPriority,
									const int inHeapID );
//カーソルアクター作成
CLACT_WORK_PTR CmnRes_CreateCurAct(	CMN_RES_CNT_PTR pResCntPtr,
										CLACT_SET_PTR pClActSetPtr,
										const int inBGPriority,
										const int inHeapID );


#endif	//__CMN_RES_H__